﻿        <!-- 个人排行版页 -->
<div class="page-tab-box" id="tabBox0">
    <div class="chart-trend">
        <div class="head clearfix">
            <span class="fl">经纪人个人拓客数量：TOP 10 经纪人</span>
            <i class="fl report-icon-help" ui-tip url="views/broker-quality/tips-1.html"></i>
        </div>

        <div class="report-content">
            <ul class="clearfix">
                <li ng-class="{'on': query.type == '1'}" ng-click="query.type = '1'; query.typeText = '推荐客户(已接收)'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">推荐客户</p><span class="tip">(已接收)</span>
                </li>
                <li ng-class="{'on': query.type == '2'}" ng-click="query.type = '2'; query.typeText = '到访客户(已接收)'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">到访客户</p><span class="tip">(已接收)</span>
                </li>
                <li ng-class="{'on': query.type == '3'}" ng-click="query.type = '3'; query.typeText = '认筹客户'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">认筹客户</p><span class="tip">&nbsp;</span>
                </li>
                <li ng-class="{'on': query.type == '4'}" ng-click="query.type = '4'; query.typeText = '认购客户'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">认购客户</p><span class="tip">&nbsp;</span>
                </li>
                <li ng-class="{'on': query.type == '5'}" ng-click="query.type = '5'; query.typeText = '签约客户'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">签约客户</p><span class="tip">&nbsp;</span>
                </li>
                <li ng-class="{'on': query.type == '6'}" ng-click="query.type = '6'; query.typeText = '认购金额'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">认购金额</p><span class="tip">&nbsp;</span>
                </li>
                <li ng-class="{'on': query.type == '7'}" ng-click="query.type = '7'; query.typeText = '签约金额'; query.queryRankNumChart(); query.queryRankNumDetail()">
                    <p class="title">签约金额</p><span class="tip">&nbsp;</span>
                </li>
            </ul>

            <div id="graphic_01" class="graphic-fix" ng-show="query.rankNumChartData.length">
            </div>
            <div class="no-data ng-hide" ng-show="query.rankNumChartData && !query.rankNumChartData.length"><span>暂无数据</span></div>
        </div>
    </div>

    <!-- <div class="detail-wrapper"> -->
    <div class="toggle-table" ng-class="{'unfold': showDetail }" ng-click="showDetail = !showDetail">
        <span class="ico" ng-show="!showDetail">展开</span>
        <span class="ico ng-hide" ng-show="showDetail">收起</span>
    </div>

    <div class="detail-data ng-hide" ng-show="showDetail">
        <div class="head clearfix">
            <span>数据明细</span>
            <div class="date">
                <label class="radio"><input type="radio" name="trend-date2" ng-model="query.detailCycle" value="2"><span>日</span></label>
                <label class="radio ng-hide" ng-show="baseData.allowWeekCycle"><input type="radio" name="trend-date2" ng-model="query.detailCycle" value="1"><span>周</span></label>
                <label class="radio ng-hide" ng-show="baseData.allowMonthCycle"><input type="radio" name="trend-date2" ng-model="query.detailCycle" value="0"><span>月</span></label>
                <a href="javascript:;" class="down" ng-click="query.exportRankNumDetail()">导出</a>
            </div>
        </div>

        <div>
            <div class="report-content-auto mt10 ng-hide" id="table_content_01" ng-show="query.rankNumDetailData.detail.length">
            </div>
            <div class="no-data ng-hide" ng-show="query.rankNumDetailData.detail && !query.rankNumDetailData.detail.length"><span>暂无数据</span></div>

            <div ui-pagination page-index="query.rankNumDetailPageIndex" page-size="query.rankNumDetailPageSize" 
                 total="query.rankNumDetailTotal" changed="query.queryRankNumDetail($pageIndex)"></div>
        </div>
    </div>
    <!-- </div> -->

    <div class="chart-trend">
        <div class="head clearfix">
            <span class="fl">经纪人个人拓客质量：TOP 10 经纪人</span>
            <i class="fl report-icon-help" ui-tip url="views/broker-quality/tips-2.html"></i>
        </div>

        <div class="report-content broker-quality">
            <ul class="clearfix">
                <li ng-class="{'on': query.type2 == '1'}" ng-click="query.type2 = '1'; query.queryRankQualityChart(); query.queryRankQualityDetail()">推荐转到访</li>
                <li ng-class="{'on': query.type2 == '2'}" ng-click="query.type2 = '2'; query.queryRankQualityChart(); query.queryRankQualityDetail()">到访转认购（含直签）</li>
                <li ng-class="{'on': query.type2 == '3'}" ng-click="query.type2 = '3'; query.queryRankQualityChart(); query.queryRankQualityDetail()">推荐转签约</li>
            </ul>

            <div class="graphic-fix ng-hide" ng-show="query.rankQualityChartData.length">
                <div class="graphic-list clearfix" ng-repeat="record in query.rankQualityChartData">
                    <span class="index" ng-bind="$index + 1"></span>
                    <span class="name" ng-bind="record.brokerName"></span>
                    <span class="bg bg2" style="width: 30%;">
                        <span class="high" ng-if="query.type2 == '1'" ng-style="{'width': (record.dk2tjRate || 0) + '%'}"></span>
                        <span class="high" ng-if="query.type2 == '2'" ng-style="{'width': (record.rg2dkRate || 0) + '%'}"></span>
                        <span class="high" ng-if="query.type2 == '3'" ng-style="{'width': (record.qy2cjRate || 0) + '%'}"></span>
                    </span>
                    <span class="num" style="display:inline-block;width:70px;" ng-if="query.type2 == '1'" ng-bind-template="{{record.dk2tjRate || 0}}%"></span>
                    <span class="num" style="display:inline-block;width:70px;" ng-if="query.type2 == '2'" ng-bind-template="{{record.rg2dkRate || 0}}%"></span>
                    <span class="num" style="display:inline-block;width:70px;" ng-if="query.type2 == '3'" ng-bind-template="{{record.qy2cjRate || 0}}%"></span>

                    <div class="graphic-tips">
                        <p class="report-count" ng-if="query.type2 == '1' || query.type2 == '3'" ng-bind-template="推荐数：{{record.tjjiesCount | number}}"></p>
                        <p class="report-count" ng-if="query.type2 == '1' || query.type2 == '2'" ng-bind-template="当前已到访数：{{record.curDkCount | number}}"></p>
                        <p class="report-count" ng-if="query.type2 == '2'" ng-bind-template="当前已认购：{{record.curRgCount | number}}"></p>
                        <p class="report-count" ng-if="query.type2 == '3'" ng-bind-template="当前已签约：{{record.curQyCount | number}}"></p>
                    </div>
                </div>
            </div>
            <div class="no-data ng-hide" ng-show="query.rankQualityChartData && !query.rankQualityChartData.length"><span>暂无数据</span></div>
        </div>
    </div>

    <!-- <div class="detail-wrapper"> -->
    <div class="toggle-table" ng-class="{'unfold': showDetail2 }" ng-click="showDetail2 = !showDetail2">
        <span class="ico" ng-show="!showDetail2">展开</span>
        <span class="ico ng-hide" ng-show="showDetail2">收起</span>
    </div>

    <div class="detail-data ng-hide" ng-show="showDetail2">
        <div class="head clearfix">
            <span>数据明细</span>
            <div class="date">
                <a href="javascript:;" class="down" ng-click="query.exportRankQualityDetail()">导出</a>
            </div>
        </div>

        <div>
            <div class="report-content-auto mt10">
                <table class="ng-hide" ng-show="query.rankQualityDetailData.length">
                    <tr class="bg-blur">
                        <th>排名</th>
                        <th style="min-width: 120px">经纪人</th>
                        <th>手机</th>
                        <th style="min-width: 90px">成功推荐人数</th>
                        <th>当前已到访</th>
                        <th>当前已认购（含直签）</th>
                        <th>当前已签约</th>
                        <th>推荐转到访</th>
                        <th>到访转认购（含直签）</th>
                        <th>推荐转签约</th>
                    </tr>
                    <tr ng-repeat="record in query.rankQualityDetailData" ng-class="{'bg-blur': $odd}">
                        <td ng-bind="$index + 1 + query.rankQualityDetailPageSize * (query.rankQualityDetailPageIndex - 1)"></td>
                        <td ng-bind="record.brokerName"></td>
                        <td ng-bind="record.mobileTel"></td>
                        <td ng-bind="record.tjjiesCount | number"></td>
                        <td ng-bind="record.curDkCount | number"></td>
                        <td ng-bind="record.curRgCount | number"></td>
                        <td ng-bind="record.curQyCount | number"></td>
                        <td ng-bind-template="{{record.dk2tjRate}}%"></td>
                        <td ng-bind-template="{{record.rg2dkRate}}%"></td>
                        <td ng-bind-template="{{record.qy2cjRate}}%"></td>
                    </tr>
                </table>
            </div>
            <div class="no-data ng-hide" ng-show="query.rankQualityDetailData && !query.rankQualityDetailData.length"><span>暂无数据</span></div>

            <div ui-pagination page-index="query.rankQualityDetailPageIndex" page-size="query.rankQualityDetailPageSize" 
                 total="query.rankQualityDetailTotal" changed="query.queryRankQualityDetail($pageIndex)"></div>
        </div>
    </div>
    <!-- </div> -->
</div>
<!-- 个人排行版页 -->

<!-- 个人排行版页 模板 -->
<script type="text/template" id="templ_graphic_01">
    <#for(var i = 0; i < topNum; i++){#>
        <div class="graphic-list"><span class="index"><#=i+1#></span><span><#=data[i].Key#></span>
            <div class="graphic-list-bar"><span class="high-yellow" style="width:<#=60*data[i].Value/maxNum#>%"></span><span class="num"><#=this.thousands1(data[i].Value)#><#=colUnit#></span></div></div>
    <#}#>
</script>

<script type="text/template" id="templ_table_01">
    <table>
        <tr class="bg-blur"><th style="min-width:40px">排名</th><th style="min-width:120px">经纪人</th><th style="min-width:90px">手机</th><th style="min-width:70px"><#=colTitle#></th>
                <#for(var i = 0; i < timePoint.length; i++){#>
                <th style="min-width:146px;"><#=timePoint[i]#></th>
                <#}#>
        </tr>
        <# for(var i = 0, len = detail.length; i < len; i++) { #>
            <#var record = detail[i];#>
            <#=(i > 0 && i != len - 1 && i % 2 == 1) ? '<tr class="bg-blur">' : '<tr>'#>
            <td><#=i+1 + pageSize * (pageIndex - 1)#></td>
            <td><#=record.brokerName#></td>
            <td><#=record.mobileTel#></td>
            <td><#=this.thousands1(record.total)#></td>
            <#for(var j = 0; j < timePoint.length; j++){#>
                <td><#=this.thousands1(record[timePoint[j]])#></td>
            <#}#>
        <# } #>

        <tr class="total"><td></td><td class="b">总计</td><td></td>
            <td><#=this.thousands1(totalCount)#></td>
                <#for(var i = 0; i < timePoint.length; i++){#>
                <td></td>
                <#}#>
        </tr>
    </table>
</script>
<!-- 个人排行版页 模板 -->